Computer and communications networks such as the Internet allow computer systems to exchange information using various data communications protocols. One common protocol in widespread use that provides for a reliable exchange of information in packets between computer systems in such a network is the Transmission Control Protocol or TCP. TCP is a connection oriented protocol that allows two computer systems to each maintain a connection state for a communications session that uses an underlying protocol such as the Internet Protocol (IP) at the network layer to deliver packets between the two computer systems involved in the communications session. The connection state maintained by each computer system according to TCP supports reliable delivery of the packets by detecting, for example, loss or corruption of a particular packet in the communications session, or the arrival of packets out of order from the order in which they were sent from the sending computer system, or the arrival of duplicate packets that might be received by the computer system involved in a TCP communications session.
At the beginning of a TCP communications session between two computer systems, the computer systems exchange certain TCP synchronization, synchronization acknowledgment and synchronization acknowledgment messages which allow those computer systems to begin the TCP communications session at the same starting point. The initiation procedure thus allows each computer to thereafter properly track and update the TCP connection state based on the transmission and receipt of packets sent and received during that TCP session that contain certain TCP specific information. In particular, each packet transmitted as part of the TCP communications session between the computer systems includes a TCP header portion that identifies, among other things, sequence information in the form of a sequence number for that packet. Each byte of data transmitted by a computer system for that TCP session has a unique sequence number. The sequence number portion of a TCP header is sufficiently long (e.g., 32 bits) such that duplicate sequence numbers will long since have vanished by that time the sequence of sequence numbers must wrap around to start over. Accordingly, when a computer system places data into a packet to be transmitted using the TCP communications session, the sequence number is updated immediately prior to transmission of that packet to reflect the current total number of bytes of data transmitted from this computer system thus far during this TCP communication session.
A TCP header for a packet transferred during a TCP communications session can also contain acknowledgment information in the form of a numerical acknowledgment that allows the computer sending an outbound packet to acknowledge receipt of a cumulative number of total bytes of data received thus far including a most recent former inbound packet sent from the other computer system in the communications session. In other words, sequence number information in TCP header identifies the current byte count of bytes transmitted from a computer system whereas acknowledgment number information provides an acknowledgment to the other computer system of how many bytes have actually been received thus far by this computer system. Accordingly, a computer system involved in a TCP communications session can use acknowledgment and sequence number information to detect corrupted or lost data. In such cases, a computer system can retransmit a packet of data for which an acknowledgment is either not received or which indicates an incorrect amount of data that was received based on comparison of the acknowledgment information with the sequence number information.
In addition to sequence and acknowledgment information, the TCP header portion of a packet associated with a TCP communications session also contains error correction information in the form of a checksum value which is computed based on the entire contents of the packet. A computer system involved in a TCP communications session that receives a packet can access the checksum value to compare this value with a checksum computed during receipt of the packet to ensure that the packet was properly received. The TCP header can also contain a TCP header length field that identifies how much data is in this particular packet (or in this TCP header).
Using the aforementioned information within a TCP header, if a computer system involved in a TCP communications session transmits a packet containing a valid TCP header and that packet experiences corruption (e.g., an error or change in the packet information is introduced during its transmission) as it travels through the computer network from the sending computer system to a recipient computer system, the communications session state maintained by the sending and recipient computer systems can be used by TCP to detect this disruption using the aforementioned techniques. It may be the case, for example, that a noisy transmission link over which the packet traveled on route to the recipient computer system altered one or more bits settings within the packet or introduced additional data into the packet or removed existing data within the packet. As a result, the recipient computer system might detect a checksum error or alternatively, might detect that the sequence number specified in the TCP header for that packet does not properly correspond with the number of bytes received in a packet.